﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GSAClient
{
    class OneBoxResult
    {
        private String title = null;
        private Dictionary<String, String> kvpairs = new Dictionary<String, String>();
        private bool is_redirect = false;
        private bool is_promotion = false;

        public void setTitle(String title)
        {
            this.title = title;
            if (title.Equals("redirect", StringComparison.InvariantCultureIgnoreCase))
                this.is_redirect = true;
            if (title.Equals("promotion",StringComparison.InvariantCultureIgnoreCase))
                this.is_promotion = true;
        }

        public bool isRedirect()
        {
            return this.is_redirect;
        }

        public bool isPromotion()
        {
            return this.is_promotion;
        }

        public void addKVPair(String key, String value)
        {
            kvpairs.Add(key, value);
        }

        public Dictionary<String, String> getKVPairs()
        {
            return this.kvpairs;
        }


    }
}
